#include <stdio.h>
#include "head.h"
#define M 3
int main()
{
	//input exact time
	int i =0;
	int day = 0;
	int a =0;
	int time[M]={0};
	printf("please input the exact day~~~\n");
	for(i=0;i<M;i++)
	{
		scanf("%d",&time[i]);
	}
	printf("please choose the mode you need~~~\n");
	printf("mode 1 : display whether the year is a leap year~~~\n");
	printf("mode 2 : check the totalday from 1.1 to now~~~\n");
	printf("mode 3 : display which day is it today in this week~~~\n");
	printf("mode 4 : display the calendar of this month~~~\n");
	scanf("%d",&a);

	switch(a)
	{
	case 1: i = Isleap(time[0]);
			if(i)
				printf("This year is a leap year!");
			else 
				printf("This year is not a leap year!");
			break;
	case 2: day = total_day(time[0],time[1],time[2]);
			printf("totalday is %d\n",day);break;
	case 3: i = display_week(time[0],time[1],time[2]);
			printf("This day is the %dday in this week",i);
			break;
	case 4: display_month(time[0],time[1]);break;
	default :printf("error!!!please try it again!!!");break;

	}
	//int day = 0;
	//Determine whether it is a leap year
	//Isleap(time[0]);
	//Calculate how many days have passed
	//day = total_day(time[0],time[1],time[2]);
	//printf("totalday is %d\n",day);
	//display the week
	//display_week(time[0],time[1],time[2]);
	//display the calendar
	//display_month(time[0],time[1]);
	return 0;
}
